package com.kevin.decorator;

/**
 * 装饰者模式测试类
 *
 * @author kevin
 * @date 2025/8/22
 */
public class DecoratorTest {

    public static void main(String[] args) {
        Component component = new ConcreteComponent();
        component.operation();
        System.out.println("调用具体构件方法结束");

        Component decorator = new ConcreteDecorator(component);
        decorator.operation();
        System.out.println("调用具体装饰方法结束");
    }
}
